import { useState, useEffect } from 'react';
import Dzpg from '../Dzpg';
import Moli from '../Moli';
import './index.less'
export default function ChangePanel(props) {

    const [currentPanel, setCurrentPanel] = useState('dzpg');

    const handlePanelChange = (panel) => {
        setCurrentPanel(panel);
    };
    return <>
        <div  style={{
            width: '100%',
            position: 'absolute',
            top: 50,
            left: 80,
            bottom: 30,
        }}>

            <button className='btn' onClick={() => handlePanelChange('dzpg')}>地震评估</button>
            <button  className='btn' onClick={() => handlePanelChange('moli')}>模拟</button>
            {currentPanel === 'dzpg' && <Dzpg />}
            {currentPanel === 'moli' && <Moli />}
            
        </div>
        

    </>
}